load("@batfish//skylark:pmd_test.bzl", "pmd_test")
load("@rules_java//java:defs.bzl", "java_library")

package(default_visibility = ["//visibility:public"])

java_library(
    name = "batfish",
    srcs = glob([
        "**/*.java",
    ]),
    plugins = [
        "//:auto_service_plugin",
    ],
    resources = [
        "//projects/batfish/src/main/resources",
    ],
    runtime_deps = [
        "//projects/question/src/main/java/org/batfish/question",
        "@maven//:org_apache_logging_log4j_log4j_slf4j_impl",
    ],
    deps = [
        "//projects/batfish-common-protocol:common",
        "//projects/batfish/src/main/antlr4/org/batfish/grammar/flatvyos",
        "//projects/batfish/src/main/antlr4/org/batfish/grammar/mrv",
        "//projects/batfish/src/main/antlr4/org/batfish/grammar/routing_table/eos",
        "//projects/batfish/src/main/antlr4/org/batfish/grammar/routing_table/ios",
        "//projects/batfish/src/main/antlr4/org/batfish/grammar/routing_table/nxos",
        "//projects/batfish/src/main/antlr4/org/batfish/grammar/vyos",
        "//projects/batfish/src/main/java/org/batfish/grammar/arista",
        "//projects/batfish/src/main/java/org/batfish/grammar/cisco",
        "//projects/batfish/src/main/java/org/batfish/grammar/cisco_asa",
        "//projects/batfish/src/main/java/org/batfish/grammar/cisco_nxos",
        "//projects/batfish/src/main/java/org/batfish/grammar/cisco_xr",
        "//projects/batfish/src/main/java/org/batfish/grammar/cumulus_concatenated",
        "//projects/batfish/src/main/java/org/batfish/grammar/cumulus_nclu",
        "//projects/batfish/src/main/java/org/batfish/grammar/f5_bigip_structured",
        "//projects/batfish/src/main/java/org/batfish/grammar/flatjuniper",
        "//projects/batfish/src/main/java/org/batfish/grammar/flatvyos",
        "//projects/batfish/src/main/java/org/batfish/grammar/fortios",
        "//projects/batfish/src/main/java/org/batfish/grammar/frr",
        "//projects/batfish/src/main/java/org/batfish/grammar/iptables",
        "//projects/batfish/src/main/java/org/batfish/grammar/juniper",
        "//projects/batfish/src/main/java/org/batfish/grammar/palo_alto",
        "//projects/batfish/src/main/java/org/batfish/grammar/palo_alto_nested",
        "//projects/batfish/src/main/java/org/batfish/representation/aws",
        "//projects/batfish/src/main/java/org/batfish/representation/azure",
        "//projects/batfish/src/main/java/org/batfish/representation/host",
        "//projects/batfish/src/main/java/org/batfish/representation/iptables",
        "//projects/batfish/src/main/java/org/batfish/vendor/a10/grammar",
        "//projects/batfish/src/main/java/org/batfish/vendor/check_point_gateway/grammar",
        "//projects/batfish/src/main/java/org/batfish/vendor/check_point_management",
        "//projects/batfish/src/main/java/org/batfish/vendor/check_point_management/parsing",
        "//projects/batfish/src/main/java/org/batfish/vendor/sonic/grammar",
        "//projects/bdd",
        "//projects/symbolic",
        "@maven//:com_fasterxml_jackson_core_jackson_annotations",
        "@maven//:com_fasterxml_jackson_core_jackson_core",
        "@maven//:com_fasterxml_jackson_core_jackson_databind",
        "@maven//:com_github_ben_manes_caffeine_caffeine",
        "@maven//:com_google_auto_service_auto_service_annotations",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_ibm_icu_icu4j",
        "@maven//:commons_io_commons_io",
        "@maven//:io_github_java_diff_utils_java_diff_utils",
        "@maven//:jakarta_ws_rs_jakarta_ws_rs_api",
        "@maven//:org_antlr_antlr4_runtime",
        "@maven//:org_apache_commons_commons_collections4",
        "@maven//:org_apache_commons_commons_configuration2",
        "@maven//:org_apache_commons_commons_lang3",
        "@maven//:org_apache_logging_log4j_log4j_api",
        "@maven//:org_codehaus_jettison_jettison",
        "@maven//:org_glassfish_grizzly_grizzly_http_server",
        "@maven//:org_glassfish_jersey_containers_jersey_container_grizzly2_http",
        "@maven//:org_glassfish_jersey_core_jersey_server",
        "@maven//:org_jgrapht_jgrapht_core",
    ],
)

pmd_test(
    name = "pmd",
    lib = ":batfish",
)
